Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure correct behavior when moving or replacing a file with an open handle #555

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

vbreuss
Copy link
Member

@vbreuss vbreuss commented Apr 8, 2024

Ignore FileShare for Move and Replace methods on Linux or MacOS.
See dotnet/runtime#52700 for more details.

Add tests to verify the correct behavior for the following methods while an open file handle exists:

  • File.Copy
  • File.Move
  • File.Replace
  • FileInfo.CopyTo
  • FileInfo.MoveTo
  • FileInfo.Replace

@vbreuss vbreuss self-assigned this Apr 8, 2024
Copy link

github-actions bot commented Apr 8, 2024

Stryker.NET mutation tested the changes in the pull request:
Mutation testing badge

@vbreuss vbreuss changed the title fix: ensure correct behavior when moving a file with an open handle refactor: ensure correct behavior when moving or replacing a file with an open handle Apr 8, 2024
@vbreuss vbreuss marked this pull request as ready for review April 8, 2024 06:46
@vbreuss vbreuss marked this pull request as draft April 8, 2024 07:04
@vbreuss vbreuss changed the title refactor: ensure correct behavior when moving or replacing a file with an open handle fix: ensure correct behavior when moving or replacing a file with an open handle Apr 9, 2024
@vbreuss vbreuss added the bug Something isn't working label Apr 9, 2024
@vbreuss vbreuss force-pushed the topic/test-share-for-file-move branch from 139a94e to c4eaec9 Compare April 9, 2024 14:47
Copy link

sonarcloud bot commented Apr 9, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
28.9% Duplication on New Code

See analysis details on SonarCloud

@vbreuss vbreuss marked this pull request as ready for review April 9, 2024 14:58
@vbreuss vbreuss enabled auto-merge (squash) April 9, 2024 14:59
@vbreuss vbreuss merged commit fb0420f into main Apr 9, 2024
12 of 13 checks passed
@vbreuss vbreuss deleted the topic/test-share-for-file-move branch April 9, 2024 15:07
Copy link

github-actions bot commented Apr 9, 2024

This is addressed in release v3.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working state: released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant